#include "main.h"
#include "CSurface.h"
#include "SDL/SDL.h"

bool Main::OnInit() {
    if(SDL_Init(SDL_INIT_EVERYTHING) <0 ){
        return false;
    }
    if(TTF_Init() != 0){
        return false;
    }
    
    SDL_WM_SetCaption("SDL_Base", NULL);
    
    if((Surf_Display = SDL_SetVideoMode(640,480,32, SDL_HWSURFACE | SDL_DOUBLEBUF)) == NULL){
        return false;
    }
    
    if((Surf_test = CSurface::OnLoad("img/bkg/caffe.bmp")) == NULL) {
            return false;
    }
    
    return true;
}
